<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{adviceList.firstResult}"></f:viewParam>
	   	<f:viewParam name="name" value="#{adviceList.name}" ></f:viewParam>
		<f:viewParam name="title" value="#{adviceList.title}" ></f:viewParam>
		<f:viewParam name="phone" value="#{adviceList.phone}" ></f:viewParam>
	   	<f:viewParam name="moduleName" value="政务服务我建言"></f:viewParam>
   	</f:metadata>
   
   	<ui:define name="content">
   
		<h:form id="searchForm">
			<p:panel id="searchResult" header="政务服务我建言">
				<div style="height:60px;margin-left:10px" >
					<p:outputLabel value="姓名："></p:outputLabel>
					<p:inputText value="#{adviceList.name}"></p:inputText>
					#{'    '}
					<p:outputLabel value="手机号："></p:outputLabel>
					<p:inputText value="#{adviceList.phone}"></p:inputText>
					#{'    '}
					<p:outputLabel value="标题："></p:outputLabel>
					<p:inputText value="#{adviceList.title}"></p:inputText>
					#{'    '}
					<div class="actionButtons" style="margin-top:10px;">
						<p:commandButton value="查询" ajax="false"  action="AdviceList.xhtml?faces-redirect=true&amp;includeViewParams=true&amp;firstResult=0" styleClass="blue-int"></p:commandButton>
						#{'    '}
						<p:button value="重置" outcome="AdviceList.xhtml"></p:button>
					</div>
					<div class="clearbt"></div>

				</div>
				<p:dataTable value="#{adviceList.resultList}" var="_advice" styleClass="table">
					
					<p:column >
						<f:facet name="header">标题</f:facet>
						<h:outputText value="#{_advice.title}" title="#{_advice.title}"/>
					</p:column>

					<p:column >
						<f:facet name="header">建议内容</f:facet>
						<h:outputText value="#{_advice.content}" title="#{_advice.content}"/>
					</p:column>

					<p:column >
						<f:facet name="header">姓名</f:facet>
						<h:outputText value="#{_advice.name}" title="#{_advice.name}"/>
					</p:column>
					<p:column >
						<f:facet name="header">手机号</f:facet>
						<h:outputText value="#{_advice.phone}" title="#{_advice.phone}"/>
					</p:column>
					<p:column >
						<f:facet name="header">邮箱</f:facet>
						<h:outputText value="#{_advice.email}" title="#{_advice.email}"/>
					</p:column>
					<p:column>
						<f:facet name="header">留言时间</f:facet>
						<h:outputText value="#{_advice.createDate}" >
							<f:convertDateTime pattern="yyyy/MM/dd HH:mm:ss"/>
						</h:outputText>
					</p:column>
				</p:dataTable>
			</p:panel>
			
			<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{adviceList}" />
			</ui:include>
		</h:form>
   	</ui:define>
</ui:composition>
